package com.ajk.server.service;
import java.util.List;

import com.ajk.server.model.SmsVerification;
import com.ajk.server.model.query.SmsVerificationQuery;
import com.ajk.server.model.request.GenerateVerCode;

/**
 * 短信验证码  <br>
 * t_sms_verification <br>
 * v1.0 2016-05-01
 */
 public interface SmsVerificationService {
	
	/**
 	*根据ID删除 短信验证码
 	*/
 	public Integer deleteSmsVerificationById(Integer id);
 	
 	/**
 	*新增 短信验证码
 	*/
 	public Integer batchInsertSmsVerification(List<? extends SmsVerification> smsVerifications);
 	
 	/**
 	*新增 短信验证码
 	*/
 	public Integer insertSmsVerification(SmsVerification domain);
 
 	
 	/**
 	*更新 短信验证码
 	*/
 	public Integer updateSmsVerification(SmsVerification domain);
 	
 	/**
 	*根据ID查询 短信验证码
 	*/
 	public SmsVerification findSmsVerificationById(Integer id);

	/**
 	*通过query 查询 短信验证码
 	*/
	public List<SmsVerification> findSmsVerificationByQuery(SmsVerificationQuery query);	
	
	/**
 	*通过query count总条数
 	*/
 	public Integer countSmsVerificationByQuery(SmsVerificationQuery query);
 	
 	/**
 	* 通过ids查询
 	*/
 	public List<SmsVerification> findSmsVerificationByIds(List<Integer> ids);
 	
 	/**
 	 * 发送验证码
 	 * @param generateVerCode
 	 * @return
 	 */
 	public Integer generateVerificationCode(GenerateVerCode generateVerCode);
 	
 	/**
 	 * 校验验证码
 	 * @param mobile
 	 * @param code
 	 * @return
 	 */
 	public Integer verificationSmsCode(String mobile, String code);
 	
}